<?php
$this->_var['ucctojs'][] = $this->_var['TMPL_REAL']."/js/jquery.ui.core.js";
$this->_var['ucctojs'][] = $this->_var['TMPL_REAL']."/js/jquery.ui.widget.js";
$this->_var['ucctojs'][] = $this->_var['TMPL_REAL']."/js/jquery.ui.datepicker.js";

$this->_var['cpucctojs'][] = $this->_var['TMPL_REAL']."/js/jquery.ui.core.js";
$this->_var['cpucctojs'][] = $this->_var['TMPL_REAL']."/js/jquery.ui.widget.js";
$this->_var['cpucctojs'][] = $this->_var['TMPL_REAL']."/js/jquery.ui.datepicker.js";

$this->_var['ucctcss'][] = $this->_var['TMPL_REAL']."/css/datepicker.css";
?>

<script type="text/javascript" src="{function name="parse_script" v="$ucctojs" c="$cpucctojs"}"></script>
<link rel="stylesheet" type="text/css" href="{function name="parse_css" v="$ucctcss"}" />
<style type="text/css">
	.o_tip{ border:1px solid #FBA547; padding:3px; background:#FDEFA9}
</style>
<div class="inc wb">
	<div class="inc_top">{$page_title}</div>
	<div class="inc_main">
		<div class="sub_nav">
			<span {if $ACTION_NAME eq 'index'}class="act"{/if}><a href="{url x="shop" r="uc_order#index"}">{$LANG.UC_ORDER}</a></span>
			<span {if $ACTION_NAME eq 'lottery'}class="act"{/if}><a href="{url x="shop" r="uc_order#lottery"}">{$LANG.UC_LOTTERY}</a></span>
			<span {if $ACTION_NAME eq 'ct'}class="act"{/if}><a href="{url x="shop" r="uc_order#ct"}">{$LANG.UC_CT}</a></span>
			<span {if $ACTION_NAME eq 'ktv'}class="act"{/if}><a href="{url x="shop" r="uc_order#ktv"}">{$LANG.UC_KTV}</a></span>
			<span {if $ACTION_NAME eq 'takeaway'}class="act"{/if}><a href="{url x="shop" r="uc_order#takeaway"}">{$LANG.UC_TAKEAWAY}</a></span>
		</div>
		<div class="blank1"></div>
		<div  class="uc-table">
			<div class="clearfix">
				<form action="{url x="index" r="uc_order#takeaway"}" method="post">
					订餐时间：
					<input type="text" name="begindate" id="uc_ct_begin_date" class="w100" value="{$begindate}">
					至
					<input type="text" name="enddate" id="uc_ct_end_date" class="w100" value="{$enddate}">
					<b>&nbsp;店铺名称</b>
					<input type="text" name="ct_name" value="{$smarty.request.ct_name}">
					<select name="status">
						<option value="-1" {if $status eq "-1"}selected="selected"{/if}>全部</option>
						<option value="0" {if $status eq "0"}selected="selected"{/if}>订单处理中</option>
						<option value="1" {if $status eq "1"}selected="selected"{/if}>订单成功</option>
						<option value="2" {if $status eq "2"}selected="selected"{/if}>订单失败</option>
					</select>
					<input type="submit" name="ct_submit" style="border:0" class="gray_s_btn" value="确定">
				</form>
			</div>
			<div class="blank"></div>
			<table cellspacing="0" cellpadding="0" border="0">
								<tr>
									<th width="90">订餐时间</th>
									<th width="160">店铺</th>
									<th>订单明细</th>
									<th width="90">{$LANG.ORDER_STATUS}</th>
									<th width="70">消费金额</th>
									<th width="70">付款方式</th>
								</th>
								{foreach from=$list item=order key=key}
								<tr {if $key mod 2 eq  0}class="alt"{/if}>
									<td class="tc">
									{function name="to_date" value=$order.create_time f='Y-m-d'}<br>
									{function name="to_date" value=$order.create_time f='H:i:s'}	
									</td>
									<td style="text-align:left;">
										<a href="{url x="store" r="tview" p="id=$order.supplier_location_id"}" target="_blank">{$order.location_name}</a>
									</td>
									<td style="text-align:left;">
										{foreach from=$order.menu item="m"}
										{$m.name}×{$m.nums}
										{/foreach}
										<div class="o_tip clearfix">
											{if $order.msg}备注：{$order.msg}<br>{/if}
											送餐地址：{$order.address}
										</div>
									</td>
									<td>
										{if $order.status eq 0}
										订单处理中
										{elseif $order.status eq 1}
										订单成功
										{elseif $order.status eq 2}
										订单失败{if $order.order_tip}<a href="javascript:void(0);" title="{$order.order_tip}" class="ml5 icons i005"></a>{/if}
										{/if}
									</td>
									<td>{function name="format_price" value=$order.total_price}</td>
									<td>餐到付款</td>
								</tr>
								{/foreach}
						</table>
						
						<div class="blank"></div>
						<div class="pages">{$pages}</div>
		</div>				
		
	</div>
	<div class="inc_foot"></div>
</div>
<script type="text/javascript">
	$("#uc_ct_begin_date").datepicker({
		dateFormat: 'yy-mm-dd'
	});
	$("#uc_ct_end_date").datepicker({
		dateFormat: 'yy-mm-dd'
	});
</script>